﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Article_Manager.aspx.cs" Inherits="shop_Article_Manager" %>

<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<%@ Register Assembly="Infragistics2.WebUI.Misc.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
    
    function CheckSelect(obj)
    {
        var ID = document.form1.hID.value;
        if(ID == "")
        {
            alert("请选择要做操作的记录！");
            
            return false;
        }
        
        if(obj=="del")
        {
            return confirm("确定要删除吗？");
        }
    }
  
    function uwgMain_AfterRowActivateHandler(gridName, rowId)
    {
	    var ID = igtbl_getRowById(rowId).getCellFromKey("ID").getValue();
	    document.form1.hID.value=ID;
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <br />
    <center>
    <table style="width: 96%; background-color: #85BDE2; vertical-align: middle;" border="0px"
                cellpadding="0px" cellspacing="1px">
	   <tr style="background-color: #DAE7F8;">
                <td style="height: 28px">
                       <igmisc:WebPanel ID="pTitle" runat="server" BackColor="#DAE7F8" BorderColor="#106DB0"
                        BorderWidth="1px" StyleSetName="" Width="100%" BorderStyle="Solid" Expanded="False">
                       <Header Text="文章列表">
                            <ExpandedAppearance>
                                <Styles BackColor="#DAE7F8" Font-Bold="True" Height="26px" >
                                </Styles>
                            </ExpandedAppearance>
                        </Header>
                       </igmisc:WebPanel>
                </td>
            </tr>
            <tr style="background-color: #DAE7F8;">
                <td>
                    <igtbl:UltraWebGrid ID="uwgMain" runat="server" Height="350px" Width="100%" OnPageIndexChanged="uwgMain_PageIndexChanged">
                        <Bands>
                            <igtbl:UltraGridBand AllowUpdate="No">
                                <SelectedRowStyle BackColor="#99FF66" BorderColor="#99FF33" BorderStyle="Solid" BorderWidth="1px" />
                                <Columns>
                                    <igtbl:UltraGridColumn BaseColumnName="ID" HeaderText="编号" Hidden="True" Key="ID">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <Header Caption="编号" TitleMode="Always">
                                        </Header>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="Title" HeaderText="标题" Key="Title" Width="20%">
                                        <Header Caption="标题">
                                            <RowLayoutColumnInfo OriginX="1" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="1" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="Content" HeaderText="内容" Key="Content" Width="50%">
                                        <Header Caption="内容">
                                            <RowLayoutColumnInfo OriginX="2" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="2" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="CreateDate" HeaderText="创建日期" Key="CreateDate" Width="20%" >
                                        <Header Caption="创建日期">
                                            <RowLayoutColumnInfo OriginX="3" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="3" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="isShow" HeaderText="是否发布" Key="isShow" Width="10%">
                                        <Header Caption="是否发布">
                                            <RowLayoutColumnInfo OriginX="4" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="4" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                </Columns>
                                <AddNewRow Visible="NotSet" View="NotSet">
                                </AddNewRow>
                            </igtbl:UltraGridBand>
                        </Bands>
                        <DisplayLayout AllowColSizingDefault="Free" Version="4.00" SelectTypeRowDefault="Extended"
                                Name="UWGDepotxIN" AllowSortingDefault="OnClient" AllowUpdateDefault="Yes" RowHeightDefault="20px"
                                TableLayout="Fixed" ViewType="OutlookGroupBy" AllowColumnMovingDefault="OnServer"
                                HeaderClickActionDefault="SortMulti" StationaryMargins="Header" BorderCollapseDefault="Separate"
                                StationaryMarginsOutlookGroupBy="True" AutoGenerateColumns="False">
                                <FrameStyle Font-Names="Microsoft Sans Serif" Font-Size="8.25pt" BackColor="Window"
                                    BorderWidth="1px" BorderStyle="Solid" Height="350px" Width="100%">
                                </FrameStyle>
                                <Pager MinimumPagesForDisplay="2" AllowPaging="True" NextText="下页" PrevText="上页"
                                    StyleMode="ComboBox" PageSize="20" Pattern="&lt;table width=100%&gt;&lt;tr&gt;&lt;td align=left&gt;页码：[currentpageindex]/[pagecount] 每页:[pagesize]条&lt;/td&gt;&lt;td align=right&gt;[default]&lt;td&gt;&lt;/tr&gt;&lt;/table&gt;">
                                    <Style BackColor="#FFFFCC" BorderWidth="1px" BorderStyle="Solid" Height="26px">
                                        <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" > </BorderDetails ></Style>
                                </Pager>
                                <EditCellStyleDefault BorderWidth="0px" BorderStyle="None">
                                </EditCellStyleDefault>
                                <FooterStyleDefault BackColor="LightGray" BorderWidth="1px" BorderStyle="Solid">
                                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px">
                                    </BorderDetails>
                                </FooterStyleDefault>
                                <HeaderStyleDefault HorizontalAlign="Left" BorderStyle="Solid" Height="26px">
                                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px">
                                    </BorderDetails>
                                </HeaderStyleDefault>
                                <RowStyleDefault Font-Names="Microsoft Sans Serif" Font-Size="8.25pt" BackColor="Window"
                                    BorderColor="Silver" BorderWidth="1px" BorderStyle="Solid">
                                    <Padding Left="3px"></Padding>
                                    <BorderDetails ColorLeft="Window" ColorTop="Window"></BorderDetails>
                                </RowStyleDefault>
                                <GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
                                </GroupByRowStyleDefault>
                                <GroupByBox Hidden="True" Prompt="">
                                    <Style BackColor="ActiveBorder" BorderColor="Window">
                                        </Style>
                                </GroupByBox>
                                <AddNewBox Hidden="False">
                                    <Style BackColor="Window" BorderColor="InactiveCaption" BorderWidth="1px" BorderStyle="Solid">
                                        <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" ></BorderDetails >
                                    </Style>
                                </AddNewBox>
                                <ActivationObject BorderColor="" BorderWidth="">
                                </ActivationObject>
                                <FilterOptionsDefault>
                                    <FilterOperandDropDownStyle CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                                        Font-Size="11px" BackColor="White" BorderColor="Silver" BorderWidth="1px" BorderStyle="Solid">
                                        <Padding Left="2px"></Padding>
                                    </FilterOperandDropDownStyle>
                                    <FilterDropDownStyle CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                                        Font-Size="11px" BackColor="White" BorderColor="Silver" BorderWidth="1px" BorderStyle="Solid"
                                        Height="300px" Width="200px">
                                        <Padding Left="2px"></Padding>
                                    </FilterDropDownStyle>
                                    <FilterHighlightRowStyle ForeColor="White" BackColor="#151C55">
                                    </FilterHighlightRowStyle>
                                </FilterOptionsDefault>
                                <SelectedRowStyleDefault BackColor="#80FF80">
                                </SelectedRowStyleDefault>
                                <ClientSideEvents AfterRowActivateHandler="uwgMain_AfterRowActivateHandler" />
                            </DisplayLayout>
                    </igtbl:UltraWebGrid>
                </td>
            </tr>
            <tr style="background-color: #DAE7F8;">
                <td>
                    <div style="width: 100%; background-color: #DAE7F8; text-align: left;
                        height: 26px; vertical-align: middle;">
                        &nbsp;
                        <asp:Button ID="btnAdd" runat="server" Text="添加信息" Height="22px" Width="90px" OnClick="btnAdd_Click" />
                        &nbsp;&nbsp;<asp:Button ID="btnEdit" runat="server" Text="编辑信息" Height="22px" Width="90px"  OnClientClick="return CheckSelect('')" OnClick="btnEdit_Click"/>
                        &nbsp;&nbsp;<asp:Button ID="btnDelete" runat="server" Text="删除信息" Height="22px" Width="90px"  OnClientClick="return CheckSelect('del')" OnClick="btnDelete_Click"/>
                    </div>
                </td>
            </tr>
        </table>
    </center>
    <asp:HiddenField ID="hType" runat="server" />
    <asp:HiddenField ID="hID" runat="server" />
    </form>
</body>
</html>

